package shejimoshi.simplefactory;

public class Test {
    public static void main(String[] args){
        Train t1=(Train)TrafficFactory.made("火车");
        Car c1=(Car)TrafficFactory.made("汽车");
        t1.setGl(30000);t1.setZz(100);
        c1.setGl(1000);c1.setZz(5);
        t1.transform();
        c1.transform();
    }

}
